<div class="titlebar fn-clear"><i class="iconfont icon-home_icon"></i><span class="fn-fb">{$info.title}活动信息</span></div>
<table class="pure-table pure-table-title">
    <thead><tr><th class="w100 fn-tac">名称</th><th>备注</th></tr></thead>
    <tbody>
    <tr><td>买单次数:</td><td>{$info.pay_num}</td></tr>
    <tr><td>付款额度:</td><td>{$info.pay_amount}</td></tr>
    <tr><td>赠送对象:</td><td>{if $info.types == 0}<span class="badge bg-blue">所有用户</span>{else}<span class="badge bg-yellow">会员会员</span>{/if}</td></tr>
    <tr>
        <th>赠送优惠券:</th>
        <td>
            <table class="pure-table">
            <thead>
                <tr>
                    <th class="w60"></th>
                    <th >优惠券信息</th>
                    <th class="w80 fn-tac">状态</th>
                    <th class="w100 fn-tar">剩余/初始</th>
                    <th class="w100 fn-tar">额度(￥)</th>
                    <th class="w100 fn-tar">满用(￥)</th>
                    <th class="w100 fn-tar">抵扣/折扣</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="fn-tac"><img src="{$info.coupon.img ? $info.coupon.img : '__PUBLIC__/admin/review.png'}?x-oss-process=style/80" class="w50"></td>
                    <td>
                        <i class="iconfont icon-discount"></i><span class="selectID fn-cp fn-fb" url="{:url('coupon/review',['id'=>$info.coupon.id])}">{$info.coupon.name}</span><br />
                        <span class="selectID fn-cp" url="{:url('store/review',['id'=>$info.coupon.id])}"><i class="iconfont icon-store_icon"></i>{$info.coupon.store.name}</span><br />
                        <span class="gray"><i class="iconfont icon-wodedingdan2"></i>{$info.coupon.tips}</span>
                    </td>
                    <td class="fn-tac"><span class="badge {$info.coupon.is_lock?'bg-green':''}">{$info.coupon.is_lock?'未审':'已审'}</span></td>
                    <td class="fn-tar">{$info.coupon.num}/{$info.coupon.num_of}</td>
                    <td class="fn-tar"><i class="iconfont icon-renminbi1688"></i>{$info.coupon.size|money}</td>
                    <td class="fn-tar"><i class="iconfont icon-renminbi1688"></i>{$info.coupon.howmuch|money}</td>
                    <td class="fn-tar">{if $info.coupon.types}{$info.coupon.discount}折{else}￥{$info.coupon.price}{/if}</td>
                </tr>
            </tbody>
            </table>
        </td>
    </tr>
    </tbody>
</table>
<div class="cards">
    <div class="card">
        <div class="fn-left"><i class="iconfont icon-wodedingdan2"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$pay_num}</div><div class="text">支付数量</div></div>
    </div>
    <div class="card yellow">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$pay_amount}</div><div class="text">支付金额</div></div>
    </div>
    <div class="card violet">
        <div class="fn-left"><i class="iconfont icon-my_icon"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$gite_num}</div><div class="text">参与用户</div></div>
    </div>
    <div class="card green">
        <div class="fn-left"><i class="iconfont icon-my_icon"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$coupon_num}</div><div class="text">获增用户</div></div>
    </div>
    <div class="card blue">
        <div class="fn-left"><i class="iconfont icon-my_icon"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$take_num}</div><div class="text">已领用户</div></div>
    </div>
</div>
<div class="titlebar">
    <div class="fn-left button-group">
    <a href="{:url('manage.gift/review',['id' => $id,'time' => $time,'types'=>1])}" class="button {$types==1?'button-green':''}">未获增</a>
    <a href="{:url('manage.gift/review',['id' => $id,'time' => $time,'types'=>2])}" class="button {$types==2?'button-green':''}">已获增</a>
    <a href="{:url('manage.gift/review',['id' => $id,'time' => $time,'types'=>3])}" class="button {$types==3?'button-green':''}">未领礼</a>
    <a href="{:url('manage.gift/review',['id' => $id,'time' => $time,'types'=>4])}" class="button {$types==4?'button-green':''}">已领礼</a>
</div>

<div class="fn-right">
    <form class="input-group" id="form" action="{:url('manage.gift/review')}">
        <input type="hidden" name="id" value="{$id}"/>
        <input type="hidden" name="types" value="{$types}"/>
        <input placeholder="开始时间" class="input w100 ui-date" type="text" name="starttime" readonly autocomplete="false" value="{$starttime}"/>
        <input placeholder="结束时间" class="input w100 ui-date" type="text" name="endtime" readonly autocomplete="false" value="{$endtime}"/>
        <input type="submit" value="搜索" class="button button-blue" />
    </form>
</div>
<div class="fn-right button-group">    
    <a href="{:url('manage.gift/review',['id' => $id,'time' => 1,'types'=>$types])}" class="button {$time==1?'button-violet':''}">今日</a>
    <a href="{:url('manage.gift/review',['id' => $id,'time' => 2,'types'=>$types])}" class="button {$time==2?'button-violet':''}">昨日</a>
    <a href="{:url('manage.gift/review',['id' => $id,'time' => 30,'types'=>$types])}" class="button {$time==30?'button-violet':''}"">本月</a>
    <a href="{:url('manage.gift/review',['id' => $id,'time' => 60,'types'=>$types])}" class="button {$time==60?'button-violet':''}"">上月</a>
</div>
<div class="fn-right">
    <span class="button button-disabled">获赠时间 : </span>
</div>
</div>
<table class="pure-table pure-table-title">
    <thead>
        <tr>
            <th class="w60 fn-tac"></th>
            <th>昵称</th>
            <th class="w100 fn-tar">金额(￥)</th>
            <th class="w100 fn-tar">笔数</th>
            <th class="w80 fn-tac">赠送</th>
            <th class="w80 fn-tac">领取</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $vo}
        <tr>
            <td class="fn-tac"><img src="{$vo.user.face}" class="w40" /></td>
            <td><a href="javascript:openwin('{:url('user/review',['uid' => $vo.user.id])}')">{$vo.user.nickname}</a></td>
            <td class="fn-tar">{$vo.pay_num}</td>
            <td class="fn-tar">{$vo.pay_amount}</td>
            <td class="fn-tac">{if $vo.coupon_id > 0}<span class="badge bg-green">已赠</span>{else}<span class="badge">未增</span>{/if}</td>
            <td class="fn-tac">{if $vo.is_take}<span class="badge bg-green">已领</span>{else}<span class="badge">未领</span>{/if}</td>
        </tr>
        {/foreach}
    </tbody>
 </table>
 {$list|raw}
<script type="text/javascript">
Do('base','form','layer','date', function () {
    $('#form').isForm({types:1});
    $('.isDel').isDel();
    $(".win").win({reload:1});
    $('.istop').click(function () {
        var url = $(this).attr("url");
        parent.layer.confirm('确认要改变用户身份?',{ icon: 3,title: '友情提示' }, function (index) {
            $.getJSON(url, function (data) {window.location.reload();});
            parent.layer.close(index);
        });
    })
})
</script>